import {IonicPage, NavController} from "ionic-angular";
import {Component} from "@angular/core";
import {BusifoodTablesetPage} from "./busifood-tableset/busifood-tableset";
import {BusinessFoodPrintPage} from "./business-food-print/business-food-print";
import {BusifoodTableshowPage} from "./busifood-tableshow/busifood-tableshow";
import {BusinessFoodCashPage} from "./business-food-cash/business-food-cash";
import {BusinessFoodClassifyPage} from "./business-food-classify/business-food-classify";



@IonicPage()
@Component({
  selector:"page-business-food",
  templateUrl:"business-food.html",
})


export class BusinessFoodPage {
  private pageMenu = [
    {
      name:'餐台点餐',
      icon:'restaurant'
    },
    {
      name:'餐台设置',
      icon:'settings'
    },
    {
      name:'收银结算',
      icon:'cash'
    },
    {
      name:'厨打状态',
      icon:'logo-buffer'
    },
    {
      name:'菜品分类',
      icon:'nutrition'
    },
    {
      name:'菜品设置',
      icon:'options'
    }
  ];
  constructor(public nav:NavController){}

  openTableset(){
    this.nav.push('BusifoodTablesetPage');
  }

  openTabelorder(){
    this.nav.push('BusifoodTableshowPage');
  }

  openTabelcash(){
    this.nav.push('BusinessFoodCashPage');
  }

  openPrint(){
    this.nav.push('BusinessFoodPrintPage');
  }

  openClassify() {
    this.nav.push('BusinessFoodClassifyPage');
  }

  openMenu() {
    this.nav.push('BusinessFoodMenuPage');
  }

  pushPage(name){
    switch (name){
      case '餐台点餐':
        this.openTabelorder();
        break;
      case '餐台设置':
        this.openTableset();
        break;
      case '收银结算':
        this.openTabelcash();
        break;
      case '厨打状态':
        this.openPrint();
        break;
      case '菜品分类':
        this.openClassify();
        break;
      case '菜品设置':
        this.openMenu();
        break;
    }
  }
}
